/**
 * @PackageName: PACKAGE_NAME
 * @ClassName:
 * @author: wxc
 * @date 2021/5/20 de
 */
public class Dome01 {
    public static void main(String[] args) {
        int[] nums = new int[]{1,2,3,4,5,6,7,8};
        int[] print = print(nums);
        for (int i : print) {
            System.out.println(i);
        }
    }

    private static int[] print(int[] nums) {
        int []number =new int[2];
        for (int i = 0; i < nums.length; i++) {
            for (int i1 = i + 1; i1 < nums.length; i1++) {
                if (nums[i] + nums[i1] == 9) {
                    number[0]=nums[i];
                    number[1]=nums[i1];
                    return number;
                }
            }
        }
        return number;
    }

    // i =0  i1=1

}
